<?php

namespace App\Http\Controllers\Backend;
use App\Http\Controllers\BaseController;
use App\Http\Middleware\AdminAuth;
use App\Params\Backend\AddressListParams;
use App\Params\Backend\AfterSalesApplyAuditParams;
use App\Params\Backend\AfterSalesApplyListParams;
use App\Services\AfterSales\AfterSalesService;
use App\Services\Customer\AddressService;
/**
 * 订单售后控制器
 *
 * @package App\Http\Controllers\H5
 * @author WangBin
 * @date 2021-10/11
 */
class AfterSalesController extends BaseController
{
    public function __construct()
    {
        $this->middleware(AdminAuth::class);
    }

    /**
     * 售后申请单列表
     *
     * @throws
     * @return
     */
    public function getApplyList()
    {
        $param = AfterSalesApplyListParams::create();
        $ret = AfterSalesService::getInstance()->getList($param);
        return $this->success($ret);
    }

    /**
     * 审核售后申请单
     *
     * @return \Illuminate\Http\JsonResponse
     */
    public function auditApply()
    {
        $param = AfterSalesApplyAuditParams::create();
        AfterSalesService::getInstance()->auditApply($param);
        return $this->success();
    }
}
